package controllers

import javax.inject.Inject

import dao._
import play.api.mvc._

import scala.concurrent.ExecutionContext.Implicits.global

/**
 * Created by yz on 2017/6/7.
 */
class TestController @Inject()(circAllPositionsDao: BrowseCircRnaDao, cc: ControllerComponents) extends
  AbstractController(cc) {

  def toIndex = Action {
    Ok(views.html.test())
  }


  def test = Action.async {
    circAllPositionsDao.selectAll.map { x =>
      val chromosomes = x.map(_.chromosome).distinct.toBuffer
      Ok("success!" + chromosomes)
    }

  }

}
